﻿using System;
using System.IO;
using System.Linq;
using System.Threading;

namespace Script
{
    public class dos2 : BaseClass
    {
        public dos2()
        {
            var files = CheckPath(null, searchOption: SearchOption.AllDirectories);

            var index = 0;
            files.AsParallel().WithDegreeOfParallelism(Environment.ProcessorCount - 2).ForAll(file =>
            {
                RunFile(this.GetType().Name, string.Format(" -k -s -q -i -o \"{0}\"", file));
                Interlocked.Increment(ref index);
                Console.WriteLine($"{index}/{files.Count}");
            });
        }
    }

    public class dos2unix : dos2
    {
    }

    public class unix2dos : dos2
    {
    }

    public class mac2unix : dos2
    {
    }

    public class unix2mac : dos2
    {
    }
}